// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_FIN_ACCOUNTING_VOUCHER_ITEM
// * CreateDate    : 2012/2/2 10:17:12
// * Creater       : CodeSmith
// * LastChangeDate: 2012/2/2 10:17:12
// * LastChanger   : 2012/2/2 10:17:12
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class FinAccountingVoucherItemEntity : EntityBase
    {
        public FinAccountingVoucherItemTable TableSchema
        {
            get
            {
                return FinAccountingVoucherItemTable.Current;
            }
		}
		
		public FinAccountingVoucherItemEntity()
        {

        }
		
		public FinAccountingVoucherItemEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ItemId = Convert.ToString(CommonFunctions.ToObject(dr["ITEM_ID"]));
			this.VoucherId = Convert.ToString(CommonFunctions.ToObject(dr["VOUCHER_ID"]));
			this.AccountsCode = Convert.ToString(CommonFunctions.ToObject(dr["ACCOUNTS_CODE"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
			this.DebitAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["DEBIT_AMOUNT"]));
			this.CreditAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["CREDIT_AMOUNT"]));
        }
		
		public FinAccountingVoucherItemEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ItemId = Convert.ToString(CommonFunctions.ToObject(dr["ITEM_ID"]));
			this.VoucherId = Convert.ToString(CommonFunctions.ToObject(dr["VOUCHER_ID"]));
			this.AccountsCode = Convert.ToString(CommonFunctions.ToObject(dr["ACCOUNTS_CODE"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
			this.DebitAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["DEBIT_AMOUNT"]));
			this.CreditAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["CREDIT_AMOUNT"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return FinAccountingVoucherItemTable.Current;
            }
        }
		
		#region Perporty List
        public string ItemId
        {
            get { return Convert.ToString(GetData(FinAccountingVoucherItemTable.C_ITEM_ID)); }
            set { SetData(FinAccountingVoucherItemTable.C_ITEM_ID, value); }
        }
		
        public string VoucherId
        {
            get { return Convert.ToString(GetData(FinAccountingVoucherItemTable.C_VOUCHER_ID)); }
            set { SetData(FinAccountingVoucherItemTable.C_VOUCHER_ID, value); }
        }
		
        public string AccountsCode
        {
            get { return Convert.ToString(GetData(FinAccountingVoucherItemTable.C_ACCOUNTS_CODE)); }
            set { SetData(FinAccountingVoucherItemTable.C_ACCOUNTS_CODE, value); }
        }
		
        public string Description
        {
            get { return Convert.ToString(GetData(FinAccountingVoucherItemTable.C_DESCRIPTION)); }
            set { SetData(FinAccountingVoucherItemTable.C_DESCRIPTION, value); }
        }
		
        public decimal DebitAmount
        {
            get { return Convert.ToDecimal(GetData(FinAccountingVoucherItemTable.C_DEBIT_AMOUNT)); }
            set { SetData(FinAccountingVoucherItemTable.C_DEBIT_AMOUNT, value); }
        }
		
        public decimal CreditAmount
        {
            get { return Convert.ToDecimal(GetData(FinAccountingVoucherItemTable.C_CREDIT_AMOUNT)); }
            set { SetData(FinAccountingVoucherItemTable.C_CREDIT_AMOUNT, value); }
        }
		
		#endregion
	}
	
	
}	

